package mystudy.oop;

import mystudy.oop.DvdStatus;

import java.util.Scanner;
import java.util.UUID;

public class DvdManager {
    Dvd[] dvds = new Dvd[100];
    Scanner scan;
    public boolean upline(){return false;}
    boolean flag = false;
    Dvd dvd = new Dvd();
    dvd.Id = UUID.randomUUID().toString();
    scan = new Scanner
    public boolean downline(){return false;}
    public boolean bprrowdvd()
    {
        boolean flag = false;
        scan = new Scanner(System.in);
        System.out.println("请输入要出租的dvd");
        String name = scan.nextLine();
        Dvd dvd
        return false;
    }
    public boolean returndvd(){return false;}

    void sort(){}
    //顺次前移
    void sequentialForwardRemovement(){}
    //
    void sequentialBackendRemovement(){}

    Dvd serchByNmae(String name)
    {
        Dvd dvd= null;
        for(Dvd d:dvds)
        {
            if(d.name.equals(name))
            {
                if(d.status == DvdStatus.INSTORE)
                {
                    dvd=d;
                    break;
                }
                else{
                    System.out.println("该dvd不可出租");
                }
            }
        }
        return dvd;
    }
    double countcost(Dvd dvd){return 0;}
    void printf(Dvd dvd)
    {
        System.out.println(dvd);
    }
}
